home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4708 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
  2. From: Dan Pop <danpop@mail.cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Fastest way to computer log(base2) of x?
  5. Date: Tue, 6 Feb 1996 17:32:08 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9602061633.AA15316@dxmint.cern.ch>
  8. References: <4e61iu$p6e@villa.fc.net> <4e72il$dvl@ns.RezoNet.NET> <4f647p$lc5@druid.borland.com>
  9. X-NNTP-Posting-Host: hpl3sn03.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
  12.  
  13. pete@borland.com (Pete Becker) writes:
  14.  
  15. >Still faster: use a table with INT_MAX entries and remove all of the 
  16. >conditionals. Why do the responses here assume that sacrificing speed for 
  17. >space savings is appropriate? The question asks for the fastest, not something 
  18. >that's reasonably fast but doesn't use much space.
  19.  
  20. Initializing a table with 2147483648 entries might take quite a lot of
  21. time.  That is, assuming that the system is configured with enough virtual
  22. memory :-)
  23.  
  24. Dan
  25. -- 
  26. Dan Pop
  27. CERN, CN Division
  28. Email: danpop@mail.cern.ch 
  29. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  30.